import 'package:flutter/material.dart';
import 'package:wallet_utils/color.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

/// 选择器配置
class PickerConfig {
  PickerConfig(
      {required this.backgroundColor,
      required this.cancelTextStyle,
      required this.confirmTextStyle,
      required this.titleTextStyle,
      required this.pickerHeight,
      required this.titleHeight,
      required this.itemHeight,
      required this.itemTextStyle,
      required this.itemTextSelectedStyle,
      required this.dividerColor,
      required this.cornerRadius});

  final Color backgroundColor;
  final TextStyle cancelTextStyle;
  final TextStyle confirmTextStyle;
  final TextStyle titleTextStyle;
  final double pickerHeight;
  final double titleHeight;
  final double itemHeight;
  final TextStyle itemTextStyle;
  final TextStyle itemTextSelectedStyle;
  final Color dividerColor;
  final double cornerRadius;

  static PickerConfig getDefaultPickerConfig({double? pickerHeight}) {
    return PickerConfig(
        backgroundColor: Colors.white,
        cancelTextStyle:
            TextStyle(fontSize: 14.sp, color: ColorManager.color999999),
        confirmTextStyle:
            TextStyle(fontSize: 14.sp, color: ColorManager.colorF65247),
        titleTextStyle: TextStyle(
            fontSize: 16.sp,
            color: ColorManager.color323233,
            fontWeight: FontWeight.w600),
        pickerHeight: pickerHeight ?? 336.w,
        titleHeight: 48.w,
        itemHeight: 48.w,
        itemTextStyle:
            TextStyle(fontSize: 15.sp, color: ColorManager.color646556),
        itemTextSelectedStyle: TextStyle(
            fontSize: 18.sp,
            color: ColorManager.color323233,
            fontWeight: FontWeight.w600),
        dividerColor: ColorManager.colorE7E7E7,
        cornerRadius: 12.w);
  }
}
